#ifndef COMMON_VECTORITERATOR_H
#define COMMON_VECTORITERATOR_H

#include <vector>
#include "Common/Collections/IIterator.h"

namespace cmn {

	template<typename T>
	class VectorIterator : public IIterator<T> {
	private:
		const typename std::vector<T>* m_vector;
		typename std::vector<T>::const_iterator m_iterator;

	public:

		VectorIterator( const typename std::vector<T>* vector ) {
			m_vector = vector;
			m_iterator = m_vector->begin();
		}

		virtual void Start() {
			m_iterator = m_vector->begin();
		}

		virtual void Next() {
			++m_iterator;
		}

		virtual T Current() {
			return *m_iterator;
		}

		virtual bool IsEnd() {
			return m_iterator == m_vector->end();
		}

	};
}
#endif
